import 'package:flutter_module/model/http_header_model.dart';
import 'package:flutter_module/model/user.dart';

class SharedPreferences {
  static final SharedPreferences _sharedPreferences =
      SharedPreferences._internal();

  static SharedPreferences get instance {
    return _sharedPreferences;
  }

  factory SharedPreferences() {
    return _sharedPreferences;
  }

  User _user = User();
  HttpHeaderModel _httpHeader = HttpHeaderModel();
  bool _isDebug = false;

  User get user => _user;
  set user(User user) => _user = user;

  HttpHeaderModel get httpHeader => _httpHeader;
  set httpHeader(HttpHeaderModel httpHeaderModel) =>
      _httpHeader = httpHeaderModel;

  bool get isDebug => _isDebug;
  set isDebug(bool isDebug) => _isDebug = isDebug;

  SharedPreferences._internal();
}
